package com.mars.common.page;

import java.io.Serializable;

import com.mars.common.page.constants.PageConst;

/**
 * 分页参数传递工具类 
 * @author yhaoquan
 *
 */
public class PageParam implements Serializable {

	private static final long serialVersionUID = 1L;
	
	/**
	 * 当前页数
	 */
	private int page = PageConst.DEFAULT_PAGE ;
	
	/**
	 * 每页记录数
	 */
	private int rows = PageConst.DEFAULT_ROWS ;
	
	/**
	 * 排序：order id desc
	 */
	private String orderby ;
	
	public PageParam() {}
	
	public PageParam(int page, int rows) {
		super();
		this.page = page;
		this.rows = rows;
	}
	
	public PageParam(int page, int rows, String orderby) {
		super();
		this.page = page;
		this.rows = rows;
		this.orderby = orderby;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getOrderby() {
		return orderby;
	}

	public void setOrderby(String orderby) {
		this.orderby = orderby;
	}

	@Override
	public String toString() {
		return "PageParam [page=" + page + ", rows=" + rows + ", orderby=" + orderby + "]";
	}
}
